import {getBaseInfo} from '../asstes/http/api'

const defaultState = {
  baseInfoList: [
    {name: 'zhangsan', num: '200'}
  ]
}

export default (state=defaultState, action)=> {
  if(action.type === 'getBaseInfo') {
    let newState = JSON.parse(JSON.stringify(state))
    newState.baseInfoList = getBaseInfo()
    return newState
  }
  return state
}